
#include "iostream"
#include "vector"
#include "unordered_map"
#include "unordered_set"
#include "algorithm"
#include "string"
#include "list"
#include "string.h"

struct Mirror{
    std::unordered_map<char,char> map;
    char get_mirror(char c){
        if(map.find(c)==map.end()){
            return ' ';
        }
        return map[c];
    }
    Mirror(){
        map['A']='A';
        map['E']='3';
        map['H']='H';
        map['I']='I';
        map['J']='L';
        map['L']='J';

        map['M']='M';
        map['T']='T';
        map['O']='O';
        map['S']='2';
        map['U']='U';
        map['V']='V';
        map['W']='W';
        map['X']='X';

        map['Y']='Y';
        map['Z']='5';
        map['1']='1';
        map['2']='S';
        map['3']='E';
        map['5']='Z';
        map['8']='8';
    }
};
Mirror mirror;

class OneLoop {
public:
    bool is_huiwen= true;
    bool is_mirror= true;
    OneLoop(std::string & s) {
        for(int i=0;i<s.size()/2;i++){
            if(s[i]!=s[s.size()-i-1]){
                is_huiwen=false;
            }
            if(mirror.get_mirror(s[i])!=s[s.size()-i-1]){
                is_mirror=false;
            }
        }
        std::cout<<s;
        if(!is_mirror&&!is_huiwen){
            printf(            " -- is not a palindrome."       );

//                   该字符串是回文，但非镜面字符串

//                    该字符串非回文，但是镜面字符串

//                该字符串是回文，也是镜面字符串


        }else if(is_huiwen&&!is_mirror){
            printf(" -- is a regular palindrome." );
        }else if(is_mirror&&!is_huiwen){
            printf(" -- is a mirrored string.");
        }else{
            printf( " -- is a mirrored palindrome.");
        }
        printf("\n\n");
//        };
    }
};

class Solution {
public:
    void run() {

        bool first = true;
        int a,b;
        std::string s;
        while (std::getline(std::cin,s)) {
            OneLoop loop(s);
        }
    }
};

int main() {
//    bool cur_num= true;
    Solution().run();
    return 0;
}

